package com.ruoyi.labour.mapper;

import com.ruoyi.labour.domain.LabourCustomer;
import com.ruoyi.labour.domain.vo.UpdateCustomerPhoneVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @ClassName: CustomerPhoneMapper
 * @Description:
 * @Author: Awen
 * @Date: 2023/5/15 11:28
 */
public interface CustomerPhoneMapper {
    int addCustomerPhone(String phone);

    List<LabourCustomer> selectCustomerPhone();

    int deleteCustomerPhone(Integer id);

    int updateCustomerPhoneState(@Param("state") Integer state, @Param("id") Integer id);

    /**
     * 检查电话是否重复
     * @param customerPhone
     * @return
     */
    int checkCustomerPhoneExist(@Param("customerPhone") String customerPhone );

    /**
     * 检查电话是否存在
     * @param id
     * @return
     */
    int checkCustomerPhoneExistById(@Param("id") int id );

    /**
     * 检查电话是否存在
     * @param updateCustomerPhoneVo
     * @return
     */
    int updateCustomerPhone(UpdateCustomerPhoneVo updateCustomerPhoneVo);
}
